<?php

namespace app\common\validate;


class ArticleCateValidate extends BaseValidate {
	/**
	 * 验证规则
	 */
	protected $field = [
		'article_cat_id' => '',
		'parent_id'      => '父id',
		'cate_name'       => '分类名称',
		'cate_type'       => '类型',
		'keywords'       => '关键词',
		'description'    => '分类描述',
		'sort'           => '排序',
		'is_navi'        => '导航',

	];

	/**
	 * 验证场景
	 */
	protected $scene = [
		'index'  => [],
		'save'   => [
			'cate_name' =>'require',
			'cate_type'=>'require|in:1,2,3,4,5,6,7,8',
			'sort'=>'require|integer',
		],
		'update' => ['article_cat_id' => 'require', 'cate_type' => 'in:1,2,3,4,5,6,7,8', 'sort' => 'integer',],
		'delete' => [
			'id'=>'require'
		],
		'read'   => [
			'id'=>'require'
		]
	];

	/**
	 * 提示消息
	 */
	protected $message = [

	];


}
